package com.yilin.tms.core.entity.data.monitor;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="data_tms_root_param")
@TableName(value = "data_tms_root_param")
public class TmsRootData extends BaseEntity {
    public enum Status {
        createSuccess(0, "创建成功"),
        createFail(1, "创建失败");
        @EnumValue
        public Integer index;
        public String name;

        Status(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    //所属平台
    @Column(name = "plat_id")
    private String platId;//平台唯一ID 资源信息单（车辆+驾驶员）属于共享数据 没有平台ID
    @Column(name = "plat_name")
    private String platName;//平台名称 资源信息单（车辆+驾驶员）属于共享数据  没有平台ID
    @Column(name="identification")
    private String identification;//数据唯一标识
    @Column(name="json_content" ,columnDefinition="TEXT")
    private String jsonContent;//Json报文数据

    //组合报文最外层参数 提交时用
    @Column(name="user_name")
    private String userName;//用户名
    @Column(name="document_name")
    private String documentName;//文档名称
    @Column(name="document_version_number")
    private String documentVersionNumber = "V1.0";//文档版本
    @Column(name="sender_code")
    private String senderCode;//企业发送代码
    @Column(name="recipient_code")
    private String recipientCode;//企业回执码 wlhymot
    @Column(name="message_sending_dateTime")
    private String messageSendingDateTime;//消息发送日期
    @Column(name="token")
    private String token;//登录Token
    @Column(name="encrypted_code" ,columnDefinition="TEXT")
    private String encryptedCode;//加密秘钥
    @Column(name="encrypted_content",columnDefinition="TEXT")
    private String encryptedContent;//加密数据
    @Column(name="message_reference_number")
    private String messageReferenceNumber;//AppUtil.getUUID().substring(0, 32)
    @Column(name="ipc_type")
    private String ipcType;//"WLHY_YD0001";

    //自动提交次数
    @Column(name = "auto_post_count")
    private Integer autoPostCount;

    @Column(name="status")
    private Status status;//数据状态
    @Column(name="return_state")
    private String returnState;//返回状态说明
    @Column(name="return_msg" ,columnDefinition="TEXT")
    private String returnMsg;//返回状态/失败原因说明


    public String getIdentification() {
        return identification;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

    public Integer getAutoPostCount() {
        return autoPostCount;
    }

    public void setAutoPostCount(Integer autoPostCount) {
        this.autoPostCount = autoPostCount;
    }

    public String getReturnState() {
        return returnState;
    }

    public void setReturnState(String returnState) {
        this.returnState = returnState;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public String getJsonContent() {
        return jsonContent;
    }

    public void setJsonContent(String jsonContent) {
        this.jsonContent = jsonContent;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDocumentName() {
        return documentName;
    }

    public void setDocumentName(String documentName) {
        this.documentName = documentName;
    }

    public String getDocumentVersionNumber() {
        return documentVersionNumber;
    }

    public void setDocumentVersionNumber(String documentVersionNumber) {
        this.documentVersionNumber = documentVersionNumber;
    }

    public String getSenderCode() {
        return senderCode;
    }

    public void setSenderCode(String senderCode) {
        this.senderCode = senderCode;
    }

    public String getRecipientCode() {
        return recipientCode;
    }

    public void setRecipientCode(String recipientCode) {
        this.recipientCode = recipientCode;
    }

    public String getMessageSendingDateTime() {
        return messageSendingDateTime;
    }

    public void setMessageSendingDateTime(String messageSendingDateTime) {
        this.messageSendingDateTime = messageSendingDateTime;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getEncryptedCode() {
        return encryptedCode;
    }

    public void setEncryptedCode(String encryptedCode) {
        this.encryptedCode = encryptedCode;
    }

    public String getEncryptedContent() {
        return encryptedContent;
    }

    public void setEncryptedContent(String encryptedContent) {
        this.encryptedContent = encryptedContent;
    }

    public String getMessageReferenceNumber() {
        return messageReferenceNumber;
    }

    public void setMessageReferenceNumber(String messageReferenceNumber) {
        this.messageReferenceNumber = messageReferenceNumber;
    }

    public String getIpcType() {
        return ipcType;
    }

    public void setIpcType(String ipcType) {
        this.ipcType = ipcType;
    }

    public String getPlatId() {
        return platId;
    }

    public void setPlatId(String platId) {
        this.platId = platId;
    }

    public String getPlatName() {
        return platName;
    }

    public void setPlatName(String platName) {
        this.platName = platName;
    }
}